/*
2021-8-2
https://www.acwing.com/problem/content/3793/
*/
#include<cstring>
#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    int n,m;
    cin>>n>>m;
    int cnt=0;
    int pre=-1;
    
    while(n--)
    {
        int x;
        cin>>x;
        if(x-pre<=m) cnt++;
        else cnt=1;
        pre=x;
    }
    
    cout<<cnt<<endl;
    
    return 0;
}

